package com.airconditioner.sales.service;

import android.content.Context;
import android.util.Log;

import com.igexin.sdk.GTIntentService;
import com.igexin.sdk.message.GTCmdMessage;
import com.igexin.sdk.message.GTTransmitMessage;

import org.xutils.common.util.LogUtil;

/**
 * 作者：shuizi_wade on 2017/2/18 16:28
 * 邮箱：674618016@qq.com
 */
public class IntentService extends GTIntentService {
    @Override
    public void onReceiveServicePid(Context context, int i) {

    }

    @Override
    public void onReceiveClientId(Context context, String clientid) {
        Log.e(TAG, "onReceiveClientId -> " + "clientid = " + clientid);
    }

    @Override
    public void onReceiveMessageData(Context context, GTTransmitMessage gtTransmitMessage) {
        byte[] payload = gtTransmitMessage.getPayload();
        String data = new String(payload);
        LogUtil.i("receiver payload : " + data);
    }

    @Override
    public void onReceiveOnlineState(Context context, boolean b) {

    }

    @Override
    public void onReceiveCommandResult(Context context, GTCmdMessage gtCmdMessage) {
        Log.e(TAG, "onReceiveMessageData -> " + gtCmdMessage.getPkgName() + ";" + gtCmdMessage.getAppid() + ";" + gtCmdMessage.getAction());
    }
}
